﻿using NHibernate.Mapping.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IceZero.DataStore.Models
{
    /// <summary>
    /// 操作统计信息，统计正向信息
    /// </summary>
    [Class(Table = "IceZero_OperationStatisticRecord")]//定义数据库表名
    public class OperationStatisticRecord
    {
        public OperationStatisticRecord()
        {
            Id = Guid.NewGuid().ToString("N");
        }

        /// <summary>
        /// Id 值
        /// </summary>
        [Id(0, Name = "Id", TypeType = typeof(string), Length = 36)]
        [Key(1)]
        [Generator(2, Class = "assigned")]
        public virtual string Id { get; set; }

        /// <summary>
        /// 动作组id
        /// </summary>
        [Property(Column = "ActionComboId", TypeType = typeof(string), Length = 200)]
        public virtual string ActionComboId { get; set; }

        /// <summary>
        /// 统计的条件key值
        /// </summary>
        [Property(Column = "ConditionKey", TypeType = typeof(string), Length = 1000)]
        public virtual string ConditionKey { get; set; }

        /// <summary>
        /// 统计的条件描述
        /// </summary>
        [Property(Column = "ConditionDesc", TypeType = typeof(string), Length = 1000)]
        public virtual string ConditionDesc { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        [Property(Column = "Count", TypeType = typeof(int), Length = 11)]
        public virtual int Count { get; set; } = 0;
    }
}
